<link href="./css/style.css" rel="stylesheet" type="text/css" />
<script src="./js/jquery.js"></script>
<div class="main">
<div class="message">
	<p class="tt"><a>首页</a>><a href="userlist.php">会员管理</a>><a href="messagelist.php">留言管理</a>><span>留言详情</span></p>
	<div class="list">
	<p class="wt">
		<span class="s1">留言账户：<font>{$info[uname]}</font></span>
		<span class="s2">留言内容：<font>{$info[content]}</font></span>
		<span class="s3">留言时间：<font>{$info[addtime]}</font></span>
		{if($info['state']==1)}<span class="s4">回复内容：{$info[replay]}</span>
		<span class="s5">回复时间：{$info[replaytime]}</span>{/if}
		<span class="s6">留言状态：{if($info['state']==1)}已回复{else}未回复{/if}</span>
	</p>
	{if($info['state']==0)}
	<form class="fankui">
		<input type="hidden" value="{$mid}" name="mid" />
		<p class="p1"><span>回复内容</span><textarea name="t0" placeholder="请输入您要回复的答案" /></textarea></p>
		<button type="button" onclick="fankui();">提交回复</button>
	</form>
	{/if}
	<script>
		function fankui(){
			$.ajax({
			type:"post",
			dataType:"json",
			url:"/Moudel.php?m=m&a=huifu",
			data:$(".fankui").serialize(),
			success:function(d){
				if(d[0]==0){
					alert(d[1]);
				}
				else{
					alert(d[1]);
					window.location.href='messagelist.php';
				}
			}
			});				
		}
	</script>
	<script>
		h1 = $(".main").height();
		h2 = $(".message").height();
		if(h2>h1){
			$(".main").css("height","auto");
		}
	</script>
	</div>
</div>
</div>